package com.sinosoft.emplmis.application.web.utils;

import java.util.List;

import org.apache.poi.hssf.usermodel.HSSFRow;

import com.sinosoft.framework.dict.domain.DictCommonEntity;

/**
 * excel 导入/导出工具类
 * @author sunde
 *
 */
public class ExcelUtils {

	/**
	 * 根据code获取名称
	 * @param row
	 * @param dataList
	 * @param code
	 * @param rowNumber
	 */
	public static void getDictNameByCode(HSSFRow row,
			List<DictCommonEntity> dataList, String code,int rowNumber) {
		//获取性别名称
		 for (DictCommonEntity data : dataList) {
			if(data.getCode().equals(code)){
				row.createCell(rowNumber).setCellValue(data.getName());
			}
		}
	}
	
}
